import java.awt.desktop.ScreenSleepEvent;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int s = 8;
        s = scan.nextInt();
        for (int i = 0; i < s; i++) {
            System.out.print('*');
        }
        System.out.println();
        System.out.print(" *");
        for (int i = 0; i < s - 2; i++) {
            System.out.print("#");
        }
        System.out.print("*");
        System.out.println();
        for (int i = 1; i < s - 2; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print(' ');
            }
            System.out.print("*#");
            for (int j = 0; j < s - 4; j++) {
                System.out.print(' ');
            }
            System.out.println("#*");
        }
        for (int i = 0; i < s - 2; i++) {
            System.out.print(' ');
        }
        System.out.print(" *");
        for (int i = 0; i < s - 2; i++) {
            System.out.print("#");
        }
        System.out.print("*");
        System.out.println();
        for (int i = 0; i < s; i++) {
            System.out.print(' ');
        }
        for (int i = 0; i < s; i++) {
            System.out.print('*');
        }
    }
}